<?php /*a:3:{s:64:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\inviter\index.html";i:1568168710;s:64:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\header.html";i:1571626691;s:69:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\admin_items.html";i:1566788179;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>DSShop单店铺商城系统后台</title>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
        <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
        <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>

        <script type="text/javascript">
            var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
            var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
            var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
            var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
            var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
        </script>
    </head>
    <body>
        <div id="append_parent"></div>
        <div id="ajaxwaitid"></div>








<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3><?php echo htmlentities(lang('ds_inviter_set')); ?></h3>
                <h5></h5>
            </div>
            <?php if($admin_item): ?>
<ul class="tab-base ds-row">
    <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
    <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
    <?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
<?php endif; ?>
        </div>
    </div>

    <form id="inviter_form" method="post" enctype="multipart/form-data" name="form1" action="">
        <table class="ds-default-table">
                <tbody>
                    <tr class="noborder"> 
                        <td class="required w120"><?php echo htmlentities(lang('inviter_open')); ?></td>
                        <td class="vatop">
                            <div class="onoff">
                                <label for="inviter_open1" class="cb-enable <?php if($list_setting['inviter_open'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
                                <label for="inviter_open0" class="cb-disable <?php if($list_setting['inviter_open'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
                                <input id="inviter_open1" name="inviter_open" value="1" type="radio" <?php if($list_setting['inviter_open'] == 1): ?> checked="checked"<?php endif; ?>>
                                <input id="inviter_open0" name="inviter_open" value="0" type="radio" <?php if($list_setting['inviter_open'] == 0): ?> checked="checked"<?php endif; ?>>
                            </div>
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr class="noborder">
                    <td class="required"><label> <?php echo htmlentities(lang('inviter_level')); ?>:</label></td>
                    <td class="vatop">
                        <label>
                            <input type="radio" <?php if($list_setting['inviter_level'] == 1): ?> checked="checked"<?php endif; ?> value="1" name="inviter_level"><?php echo htmlentities(lang('inviter_level_1')); ?>
                        </label>
                        <label>
                            <input type="radio" <?php if($list_setting['inviter_level'] == 2): ?> checked="checked"<?php endif; ?> value="2" name="inviter_level"><?php echo htmlentities(lang('inviter_level_2')); ?>
                        </label>
                        <label>
                            <input type="radio" <?php if($list_setting['inviter_level'] == 3): ?> checked="checked"<?php endif; ?> value="3" name="inviter_level"><?php echo htmlentities(lang('inviter_level_3')); ?>
                        </label>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                 <tr class="noborder"> 
                        <td class="required w120"><?php echo htmlentities(lang('inviter_show')); ?></td>
                        <td class="vatop">
                            <div class="onoff">
                                <label for="inviter_show1" class="cb-enable <?php if($list_setting['inviter_show'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
                                <label for="inviter_show0" class="cb-disable <?php if($list_setting['inviter_show'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
                                <input id="inviter_show1" name="inviter_show" value="1" type="radio" <?php if($list_setting['inviter_show'] == 1): ?> checked="checked"<?php endif; ?>>
                                <input id="inviter_show0" name="inviter_show" value="0" type="radio" <?php if($list_setting['inviter_show'] == 0): ?> checked="checked"<?php endif; ?>>
                            </div>
                        </td>
                        <td class="vatop tips"><?php echo htmlentities(lang('inviter_show_notice')); ?></td>
                    </tr>
                    
                    <tr class="noborder"> 
                        <td class="required w120"><?php echo htmlentities(lang('inviter_return')); ?></td>
                        <td class="vatop">
                            <div class="onoff">
                                <label for="inviter_return1" class="cb-enable <?php if($list_setting['inviter_return'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
                                <label for="inviter_return0" class="cb-disable <?php if($list_setting['inviter_return'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
                                <input id="inviter_return1" name="inviter_return" value="1" type="radio" <?php if($list_setting['inviter_return'] == 1): ?> checked="checked"<?php endif; ?>>
                                <input id="inviter_return0" name="inviter_return" value="0" type="radio" <?php if($list_setting['inviter_return'] == 0): ?> checked="checked"<?php endif; ?>>
                            </div>
                        </td>
                        <td class="vatop tips"><?php echo htmlentities(lang('inviter_return_notice')); ?></td>
                    </tr>
                    <tr class="noborder"> 
                        <td class="required w120"><?php echo htmlentities(lang('inviter_view')); ?></td>
                        <td class="vatop">
                            <div class="onoff">
                                <label for="inviter_view1" class="cb-enable <?php if($list_setting['inviter_view'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
                                <label for="inviter_view0" class="cb-disable <?php if($list_setting['inviter_view'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
                                <input id="inviter_view1" name="inviter_view" value="1" type="radio" <?php if($list_setting['inviter_view'] == 1): ?> checked="checked"<?php endif; ?>>
                                <input id="inviter_view0" name="inviter_view" value="0" type="radio" <?php if($list_setting['inviter_view'] == 0): ?> checked="checked"<?php endif; ?>>
                            </div>
                        </td>
                        <td class="vatop tips"><?php echo htmlentities(lang('inviter_view_notice')); ?></td>
                    </tr>
                    <tr class="noborder">
                    <td class="required"><label> <?php echo htmlentities(lang('inviter_condition')); ?>:</label></td>
                    <td class="vatop">
                        <label>
                            <input type="radio" <?php if($list_setting['inviter_condition'] == 0): ?> checked="checked"<?php endif; ?> value="0" name="inviter_condition"><?php echo htmlentities(lang('inviter_condition_0')); ?>
                        </label>
                        <label>
                            <input type="radio" <?php if($list_setting['inviter_condition'] == 1): ?> checked="checked"<?php endif; ?> value="1" name="inviter_condition"><?php echo htmlentities(lang('inviter_condition_1')); ?><input type='text' name='inviter_condition_amount' id='inviter_condition_amount' value="<?php echo htmlentities($list_setting['inviter_condition_amount']); ?>" class='input-txt valid' />
                        </label>
                        
                    </td>
                    <td class="vatop tips"><?php echo htmlentities(lang('ds_yuan')); ?></td>
                </tr>
                
                    <tr class="noborder"> 
                        <td class="required w120"><?php echo htmlentities(lang('inviter_back')); ?></td>
                        <td class="vatop">
                            <?php if(!(empty($list_setting['inviter_back']) || (($list_setting['inviter_back'] instanceof \think\Collection || $list_setting['inviter_back'] instanceof \think\Paginator ) && $list_setting['inviter_back']->isEmpty()))): ?>
                            <span class="type-file-show"><img class="show_image" src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/preview.png">
                                <div class="type-file-preview"><img src="<?php echo htmlentities(UPLOAD_SITE_URL); ?>/<?php echo htmlentities(ATTACH_COMMON); ?>/<?php echo htmlentities($list_setting['inviter_back']); ?>?<?php echo htmlentities(TIMESTAMP); ?>"></div>
                            </span>
                            <?php endif; ?>
                            <span class="type-file-box"><input type='text' name='textfield' id='textfield1' class='type-file-text' />
                                <input type='button' name='button' id='button1' value='上传' class='type-file-button' />
                                <input name="inviter_back" type="file" class="type-file-file" id="inviter_back" size="30" hidefocus="true" ds_type="change_inviter_back">
                            </span>
                        </td>
                        <td class="vatop tips"><p class="notic">推广背景图片，最佳显示尺寸为360*578像素</p></td>
                    </tr>
                    <tr class="noborder"> 
                        <td class="required w120">一级推广佣金比例</td>
                        <td class="vatop">
                            <input id="inviter_ratio_1" name="inviter_ratio_1" value="<?php echo htmlentities($list_setting['inviter_ratio_1']); ?>" class="input-txt" type="text">%
                            <span class="err"></span>     
                        </td>
			<td class="vatop tips"><?php echo htmlentities(lang('inviter_ratio_1_notice')); ?></td>
                    </tr>
                    <tr class="noborder"> 
                        <td class="required w120">二级推广佣金比例</td>
                        <td class="vatop">
                            <input id="inviter_ratio_2" name="inviter_ratio_2" value="<?php echo htmlentities($list_setting['inviter_ratio_2']); ?>" class="input-txt" type="text">%
                        </td>
			<td class="vatop tips"><?php echo htmlentities(lang('inviter_ratio_2_notice')); ?></td>
                    </tr>
                    <tr class="noborder"> 
                        <td class="required w120">三级推广佣金比例</td>
                        <td class="vatop">
                            <input id="inviter_ratio_3" name="inviter_ratio_3" value="<?php echo htmlentities($list_setting['inviter_ratio_3']); ?>" class="input-txt" type="text">%
                        </td>
			<td class="vatop tips"><?php echo htmlentities(lang('inviter_ratio_3_notice')); ?></td>
                    </tr>                    
                </tbody>
                <tfoot>
                    <tr class="tfoot">
                        <td></td>
                        <td colspan="15"><input class="btn" type="submit" value="<?php echo htmlentities(lang('ds_submit')); ?>"/></td>
                    </tr>					
                </tfoot>
            </table>
    </form>
</div>

<script type="text/javascript">
    $(function() {
        $('#inviter_form').validate({
            errorPlacement: function(error, element) {
                error.appendTo(element.parent().parent().find('td:last'));
            },
            rules: {
                inviter_ratio_1 : {
                    number:true,
                    min:0,
                    max:100
                },
                inviter_ratio_2 :{
                    number:true,
                    min:0,
                    max:100
                },
                inviter_ratio_3 :{
                    number:true,
                    min:0,
                    max:100
                }
            },
            messages: {
                inviter_ratio_1 : {
                    number   : '请输入有效的数字',
                    min :'值不能小于0',
                    max :'值不能大于100'
                },
                inviter_ratio_2 :{
                    number : '请输入有效的数字',
                    min :'值不能小于0',
                    max :'值不能大于100'
                },
                inviter_ratio_3 :{
                    number: '请输入有效的数字',
                    min :'值不能小于0',
                    max :'值不能大于100'
                }
            }
        });
    });
</script>